use serde::{Deserialize, Serialize};

#[derive(Debug, PartialEq, Eq, Clone, Serialize, Deserialize)]
pub struct Role {
    pub id: u32,
    pub name: String,
}
impl Role {
    pub fn new(id: u32, name: impl AsRef<str>) -> Self {
        Self {
            name: name.as_ref().to_owned(),
            id,
        }
    }
}